package cn.tedu.fresheveryday.pojo.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

@Data
@ApiModel("接收商品分页传输的数据dto")
public class ProductPagerDTO implements Serializable {
    @ApiModelProperty(value = "商品类型id", name = "categoryId", required = true)
    private Integer categoryId;

    @ApiModelProperty(value = "商品名", name = "name", required = true)
    private String name;

    @ApiModelProperty(value = "当前的页数", name = "page", required = true)
    private Integer page;

    @ApiModelProperty(value = "每页的记录数", name = "size", required = true)
    private Integer size;

    private Integer offset; // 偏移量 = (当前的页数 - 1) × 每页的记录数

    @ApiModelProperty(value = "自定义的排序字段", name = "orderBy", required = true)
    private String orderBy;
}